<!-- Begin Sidebar Left -->
<?php echo $this->element('user/sidebar-left');?>
<!-- End Sidebar Left -->


<!-- Begin Content right -->
<div class="col-md-9 right">

	<!-- Begin Noi bac -->
	<div class="panel panel-fix">
		<div class="panel-heading"> <h3 class="panel-title"><span class="glyphicon glyphicon-fire"></span> <?= $category['Category']['name'] ?></h3> </div>
	</div>
	
	<?php if(!empty($child_categories)):?>
		<div class="block-product clearfix">
			<?php foreach($child_categories as $p):?>
			<article class="item-product" style="height:210px;">
				<a href="<?= $this->webroot . $p['Category']['als'] .'-c' . $p['Category']['id'] . $ext?>">
					<div class="thumbnail">
						<img src="<?= PUBLIC_THUMB_SHOW . $p['Category']['image'] ?>" alt="" style="height:145px;"/>
					</div>
					<div class="bottom-item">
						<center>
						<h2 class="product-name"><?= $p['Category']['name'] ?></h2>						
						</center>
					</div>
				</a>
			</article>
			<?php endforeach; ?>
		</div>		
	<?php else: ?>
		<?php if(!empty($products)):?>
			<div class="block-product clearfix">
				<?php foreach($products as $p):?>
				<article class="item-product">
					<a href="<?= $this->webroot . $p[$als]['als'] .'-d' . $p[$als]['id'] . $ext?>">
						<div class="thumbnail">
							<img src="<?= PUBLIC_THUMB_SHOW . $p[$als]['thumb'] ?>" alt=""/>
							<div class="overlay">
								<p><span style="color: #00ff00;">Giảm giá: <?= $p[$als]['discounts'] ?>%</span></p>
							</div>
						</div>
						<div class="bottom-item">
							<h2 class="product-name"><?= $p[$als]['name'] ?></h2>
							<div class="product-price">Giá: <?= $p[$als]['price'] == 0 ? 'Liên hệ' : @number_format($p[$als]['price']).'đ' ?></div>
						</div>
					</a>
				</article>
				<?php endforeach; ?>
			</div>
		<?php else: ?>
			<div class="block-product clearfix" style="border-right: 1px solid silver; border-bottom: 1px solid silver; padding: 15px;">
			<p><?= __('Đang cập nhật sản phẩm...') ?></p>
			</div>
		<?php endif; ?>
	<?php endif; ?>

	<?php $params = $this->Paginator->params(); if($params['pageCount'] > 1) :?>
		<div class="clearfix"></div>
		<?php echo $this->element('paging'); ?>
	<?php endif; ?>
	<!-- End Noi bac -->

</div>
<!-- End Content right -->